package com.example.asuper.check.Db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.widget.Toast;

/**
 * Created by Super on 2015/12/27.
 */
public class DbOpenHelper extends SQLiteOpenHelper {
    private static String name = "CheckDb.db";  //数据库名称
    private static int version = 1;               //版本号

    public DbOpenHelper(Context context) {
        super(context, name, null, version);

    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        String sql = "create table asmcheck(id integer primary key autoincrement,code varchar(100),name varchar(200),checkuser varchar(100),time varchar(100),msg varchar(500),state varchar(10),remark carchar(500));create table asmuser(id integer primary key autoincrement,name varchar(200),remark varchar(500));create table asmbas(id integer primary key autoincrement,bascode varchar(100),basvalue varchar(500),remark varchar(500))";
        db.execSQL(sql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
